﻿namespace BM.Tools.Xml.Schema
{
    using System.Collections.Generic;
    using System.Xml.Schema;

    /// <summary>
    /// A common interface for the xml schema wrapper objects visited by the <see cref="Visitor{TVisited}"/> object.
    /// </summary>
    public interface IVisited
    {
        /// <summary>
        /// Gets the parent of the visited object. When null, the object is a root of the visited tree.
        /// </summary>
        IVisited Parent
        { 
            get;
        }

        /// <summary>
        /// Gets the children of the visited object.
        /// </summary>
        IEnumerable<IVisited> Children
        {
            get;
        }

        /// <summary>
        /// Gets the xml schema object associated with the visited object.
        /// </summary>
        XmlSchemaObject SchemaObject
        { 
            get;
        }
    }
}
